package IO;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: hp
 * Date: 2024-08-26
 * Time: 15:45
 */
public class Demo4 {
    public static void main(String[] args) {
        try(InputStream inputStream = new FileInputStream("./text.txt")) {
            while(true) {
                int b = inputStream.read();
                if(b == -1) {
                    break;
                }
                System.out.printf("0x%x\n",b);
            }
        }catch (IOException e) {
            e.printStackTrace();
        }
    }
}
